﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Core;
using System.Collections;

namespace Yuanlin.Business
{
    public class ProductSpecificationRequest : TEntityRequest<ProductSpecification>
    {
        public ProductSpecificationRequest()
        {
            int? entityId = GetParameterValue<int?>(YuanlinParameterName.ProductSpecificationId);
            if (entityId.HasValue)
            {
                EntityId = entityId.Value;
            }
        }
    }
    public class ProductSpecificationListRequest: TEntityListRequest<ProductSpecification>
    {
        private int? productCategoryId = GetParameterValue<int?>(YuanlinParameterName.ProductCategoryId);
        private string unit = GetParameterValue<string>(YuanlinParameterName.Unit);

        public int? ProductCategoryId
        {
            get
            {
                return productCategoryId;
            }
            set
            {
                productCategoryId = value;
            }
        }
        public string Unit
        {
            get
            {
                if (!string.IsNullOrEmpty(unit))
                {
                    return string.Format("%{0}%", unit);
                }
                return "";
            }
            set
            {
                unit = value;
            }
        }
    }
    public class ProductSpecificationReply : EntityReply
    {
    }
}